package com.smartalarmclock.Model.Exceptions;

@SuppressWarnings("serial")
public final class InvalidReferenceToRemoveException extends InvalidDeleteDataEntityOperationException {
	
	/**
	 * Constructor
	 * @param referencingType the type of the referencing data entity
	 * @param referencingId the id of the referencing data entity
	 * @param referencedType the type of the referenced data entity
	 * @param referencedId the id of the referenced data entity
	 */
	public InvalidReferenceToRemoveException(Class<?> referencingType, int referencingId, Class<?> referencedType, int referencedId) {
		super(String.format("Entity of type %s with the id %d does not reference type %s with the id %d.",
			referencingType.getSimpleName(),
			referencingId,
			referencedType.getSimpleName(),
			referencedId));
	}
}
